import { resolvemdpathfromurl } from "./resolvemdpathfromurl";
import { states } from "./states";

export async function loadprerenderedmarkdown() {
    if (process.env.PRERENDER) {
        const url: string = resolvemdpathfromurl();
        if (!states.cachemain.get(url)) {
            if (states.menulist.includes(url)) {
                const { default: loadprerenderpage } = await import(
                    "./loadprerenderpage"
                );
                await loadprerenderpage(url);
            }
        }
    }
}
